import { REACT_ELEMENT, REACT_TEXT } from "./stants";

export function toObject(element) {
    if (typeof element === "string" || typeof element === "number") {
        return {
            type: REACT_TEXT,
            content: element,
        };
    }
    return element;
}
